#ifndef __FLASH_MEMORY__
#define __FLASH_MEMORY__

#include "clock-source.h"
#include "data-bus.h"

class FlashMemory : public ClockObserver, public DataBusMember
{
public:
  FlashMemory (uint16_t size, uint16_t address_base);
  ~FlashMemory ();

  virtual void clock_tick ();

  /* Access to registers */
  //virtual uint8_t read (uint16_t address);
  //virtual void write (uint16_t address, uint8_t data);

  /* Access to flash data */
  uint16_t operator[] (uint16_t address) const;
  uint16_t& operator[] (uint16_t address);

private:
  uint16_t _size;
  uint16_t *_data;
};

#endif /* __FLASH_MEMORY__ */
